<template>
    <div id="home">
        <div class="speed">
            <div class="title"><i class="i i-speed"></i>数据统计</div>
            <ul>
                <router-link to="/active"><i class="i i-active"></i>已处理文档：{{data.isReadCount}}</router-link>
                <router-link to="/guide"><i class="i i-guide"></i>未处理文档：{{data.noReadCount}}<</router-link>
                <router-link to="/party"><i class="i i-party"></i>总收入：{{data.totalPrice}}<</router-link>
                <router-link to="/tenancy"><i class="i i-tenancy"></i>今日收入：{{data.todayPrice}}<</router-link>
            </ul>
        </div>
    </div>
</template>

<script>
    import {
        get
    } from '@/network/request'

    export default {
        name: 'Home',
        data() {
            return {
                data:{}
            }
        },
        mounted() {
            this.$nextTick(() => {
                // 获取信息
                get('/count', {
                    cid: sessionStorage.getItem('cid')
                }).then(res => {
                    const result = res.data
                    if (result.code == 200) {
                        this.data = result.data
                    }
                }).catch()
            })
        }
    }
</script>

<style>
</style>